package conf

import (
	"github.com/BurntSushi/toml"
	"github.com/caarlos0/env/v11"
)

func LoadConfigFromToml(filepath string) error {
	config = NewDefaultConfig()
	if _, err := toml.DecodeFile(filepath, &config); err != nil {
		return err
	}
	return nil
}

func LoadConfigFromEnv() error {
	config = NewDefaultConfig()
	if err := env.Parse(config); err != nil {
		return err
	}
	return nil
}
